<template>
	<view class="ys">
		<view class="footer">
			<view class="footer-top">
				<view class="left">
					<view class="topimg">
						<!-- <image class="logobanner" src="/static/img/swiper1.png" mode="widthFix"></image> -->
						<view class="footerinfo">
							<!-- <image src="/static/img/logo.png" mode=""></image> -->
							<image :src="conf.logo && conf.logo.path" mode=""></image>
							<view class="logoinfo">
								<text class="logoname">{{conf.sitename}}</text>
								<text class="logonum">{{conf.description}}</text>
							</view>
						</view>
					</view>
					<!-- <view class="contact">
						<image src="/static/icon/facebook.png" mode="widthFix"></image>
						<image src="/static/icon/youtube.png" mode="widthFix"></image>
						<image src="/static/icon/twitter.png" mode="widthFix"></image>
					</view> -->
				</view>
				<view class="right">
					<view class="rightTenu">
						<view class="tenutitle">
							{{$t('index.gywm')}}
						</view>
						<view class="footer-menu-content">
							<view class="footer-menu-li" @click="toPage('/pages/user/about?type=brand')">
								{{$t('index.ppgs')}}
							</view>
							<view class="footer-menu-li" @click="toPage('/pages/user/about?type=intro')">
								{{$t('index.sdjj')}}
							</view>
							<view class="footer-menu-li" @click="toPage('/pages/user/about?type=agree')">
								{{$t('index.ysq')}}
							</view>
						</view>
					</view>
					<view class="rightTenu">
						<view class="tenutitle">
							{{$t('index.kfzx')}}
						</view>
						<view class="footer-menu-content">
							<view class="footer-menu-li" @click="toPage('/pages/user/about?type=shop')">
								{{$t('index.gwsm')}}
							</view>
							<view class="footer-menu-li" @click="toPage('/pages/user/questionInsert')">
								{{$t('index.kfly')}}
							</view>
							<view class="footer-menu-li" @click="toPage('/pages/user/about?type=interests')">
								{{$t('index.hyqy')}}
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="footer-icp">
				© 2020 by
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getBasicConf
	} from "@/api/api.js"
	export default {
		data() {
			return {
				conf: ''
			}
		},
		beforeMount() {

		},
		created() {
			this.getBasicConf()
		},
		methods: {
			toPage(url) {
				uni.navigateTo({
					url
				})
			},
			getBasicConf() {
				getBasicConf().then(res => {
					this.conf = res.data
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.footer {
		box-sizing: border-box;
		height: 260px;
		margin-top: 64px;
		padding: 30px 0px;
		border-top: 1px solid #dadada;
		background: #ffffff;

		.footer-icp {
			margin: 0 auto;
			width: 100%;
			max-width: 1180px;
			padding: 0 5px;
			box-sizing: border-box;
			text-align: center;
			line-height: 2.2;
			font-size: 14px;
			font-weight: 500;
			color: rgb(74, 78, 92);
		}

		.footer-top {
			margin: 0 auto;
			width: 100%;
			max-width: 1180px;
			padding: 0 5px;
			box-sizing: border-box;
			display: flex;
		}

		.left {
			width: 32%;

			.contact {
				display: flex;
				margin-top: 10px;

				image {
					width: 22px;
					margin-left: 5px;
				}
			}

			.topimg {
				position: relative;
				width: 100%;

				.logobanner {
					width: 100%;
				}

				.footerinfo {
					position: absolute;
					display: flex;
					top: 10px;
					left: 10px;
					width: calc(100% - 20px);
					color: #ff5353;

					image {
						width: 40px;
						height: 40px;
						background: #fff;
					}

					.logoinfo {
						width: calc(100% - 44px);
						display: flex;
						flex-direction: column;
						margin-left: 10px;

						.logonum {
							font-size: 14px;
						}
					}

				}
			}
		}

		.right {
			width: 68%;
			padding-right: 1.04167%;
			padding-left: 1.04167%;
			box-sizing: border-box;
			display: flex;
			justify-content: center;

			.rightTenu {
				padding-right: 1.04167%;
				padding-left: 1.04167%;
				box-sizing: border-box;
				width: 50%;

				.tenutitle {
					line-height: 2.2;
					font-size: 1em;
					font-weight: 500;
					color: rgb(74, 78, 92);
				}

				.footer-menu-li {
					-webkit-font-smoothing: antialiased;
					line-height: 2.2;
					font-size: 0.8em;
					font-weight: normal;
					color: rgb(102, 102, 102);
				}
			}
		}
	}

	@media (max-width:1000px) {
		.footer {
			height: 180px;
			margin-top: 10px;
			padding: 20px;
			padding-bottom: 0;
		}

		.footer-icp {
			font-size: 12px;
			text-align: center;
		}

		.footer-top {
			flex-direction: column;

			.left {
				width: 100%;
				display: none;
			}

			.right {
				width: 100%;
				text-align: center;
			}
		}

	}
</style>